package com.zoshine.zzg.pojo.pojostatus;

import java.util.Objects;

/**
 * 收货状态枚举
 *
 * @author 贾俊峰
 * @time 2017/6/20 17:42
 */
public enum OrderReceiveStatus {
    PENDINGRECEIVE(1, "待收货"),
    FINISHED(2, "已收货"),
    INVALID(9, "已失效");
    private int value;
    private String desc;
    OrderReceiveStatus(final int value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public static String getDesc(Integer value) {
        for (OrderReceiveStatus menuStatus : OrderReceiveStatus.values()) {
            if (Objects.equals(menuStatus.value, value)) {
                return menuStatus.desc;
            }
        }
        return null;
    }
}
